package com.dhwl.hsh.driver.ui.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.dhwl.hsh.driver.R;

import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 简要描述
 *
 * @author Derek.Kidd
 * @version V1.0.0
 * @date 2016-05-03 20:25
 */
public class HistoryBillAdapter extends BaseAdapter {


    public HistoryBillAdapter(Context context, List list) {
        super(context, list);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        ViewHolder viewHolder;
        if (null == convertView) {
            convertView = inflate(R.layout.item_hisroty_bill, null);
            viewHolder = new ViewHolder(convertView);

            convertView.setTag(viewHolder);
        } else {
            viewHolder = (ViewHolder) convertView.getTag();
        }
        return convertView;
    }

    static class ViewHolder {
        @Bind(R.id.tv_bill_title)
        TextView tvBillTitle;
        @Bind(R.id.tv_bill_cycle)
        TextView tvBillCycle;
        @Bind(R.id.tv_bill_price)
        TextView tvBillPrice;

        ViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }
}
